package ldh.im.fxbase.pojo;

import ldh.im.dto.base.Group;
import ldh.im.fxbase.cache.SoftId;

import java.util.Date;
import java.util.Set;

public class ImGroup extends Group implements SoftId {

    private Long id;
    private String name;
    private Long userId;
    private Integer hotMessageTotal;
    private Long version;
    private String newMessage;
    private Date createTime;
    private Date updateTime;
    private transient boolean isTop;

    private Set<User> userSet;

    public ImGroup() {
        createTime = new Date();
        updateTime = new Date();
        version = 0L;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getHotMessageTotal() {
        return hotMessageTotal;
    }

    public void setHotMessageTotal(Integer hotMessageTotal) {
        this.hotMessageTotal = hotMessageTotal;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getNewMessage() {
        return newMessage;
    }

    public void setNewMessage(String newMessage) {
        this.newMessage = newMessage;
    }

    public Long getVersion() {
        return version;
    }

    public void setVersion(Long version) {
        this.version = version;
    }

    public boolean isTop() {
        return isTop;
    }

    public void setTop(boolean top) {
        isTop = top;
    }

    @Override
    public String getSoftId() {
        return id+"";
    }

    public Set<User> getUserSet() {
        return userSet;
    }

    public void setUserSet(Set<User> userSet) {
        this.userSet = userSet;
    }
}
